package com.cn.springcloudshop.service.inter;

import com.cn.springcloudshop.model.YmShopProduct;
import com.cn.springcloudshop.model.YmShopProductExample;

import java.util.List;


/**
 * @Author: wuyanzu
 * @Date: 2018/7/30
 */

public interface ProductService {


    /**
    *
    * 根据id批量查询商品信息
    * @author wuyanzu
    * @date 2018/8/21 11:46
    * @param [ids]
    * @return java.util.List<com.cn.springcloudshop.model.YmShopProduct>
    */
    List<YmShopProduct> selectListByPrimaryKey(List<Long> ids);

    /**
    *
    * 根据主键修改删除标志
    * @author wuyanzu
    * @date 2018/7/31 10:34
    * @param [productId]
    * @return int
    */
    int deleteByPrimaryKey(Long productId);

    /**
    *
    * 添加商品
    * @author wuyanzu
    * @date 2018/8/10 17:12
    * @param [record]
    * @return java.lang.Long
    */
    int insert(YmShopProduct record);

    /**
    *
    * 选择性添加商品信息
    * @author wuyanzu
    * @date 2018/7/31 10:33
    * @param [record]
    * @return int
    */
    int insertSelective(YmShopProduct record);

    /**
    *
    * 根据主键查询
    * @author wuyanzu
    * @date 2018/7/31 10:33
    * @param [productId]
    * @return com.cn.springcloudshop.model.YmShopProduct
    */
    YmShopProduct selectByPrimaryKey(Long productId);

    /**
    *
    * 选择性更新商品
    * @author wuyanzu
    * @date 2018/7/31 10:33
    * @param [record]
    * @return int
    */
    int updateByPrimaryKeySelective(YmShopProduct record);

    /**
    *
    * 更新商品
    * @author wuyanzu
    * @date 2018/7/31 10:33
    * @param [record]
    * @return int
    */
    int updateByPrimaryKey(YmShopProduct record);

    /**
    *
    * 条件查询
    * @author wuyanzu
    * @date 2018/7/31 10:32
    * @param [example]
    * @return java.util.List<com.cn.springcloudshop.model.YmShopProduct>
    */
    List<YmShopProduct> selectByExample(YmShopProductExample example);

    /**
    * 批量修改商品
    * @author wuyanzu
    * @date 2018/7/31 10:02
    * @param [products]
    * @return int
    */
    int updateBatchByPK(List<YmShopProduct> products);

    /**
    *
    * 根据条件计数
    * @author wuyanzu
    * @date 2018/8/9 10:03
    * @param [example]
    * @return int
    */
    int countByExample(YmShopProductExample example);
}
